package com.propertypoint.presentation.model;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class Property implements Serializable {

	private String title;
	private String link;
	private String description;
	private String publishDate;
	private Date pDate;
	private String source;
	private String sourceLink;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(String publishDate) {
		this.publishDate = publishDate;
	}

	public Date getpDate() {
		return pDate;
	}

	public void setpDate(Date pDate) {
		this.pDate = pDate;
	}

	public String getSource() {
		if(link!=null){
			String token[]=link.split("//");
			if(token[0]!=null){
				source="Powered By: "+token[1].split("/")[0];
			}
			else{
				source="";
			}
		}
		return source;
	}

	public String getSourceLink() {
		if(link!=null){
			String token[]=link.split("//");
			if(token[0]!=null){
				sourceLink=token[0]+"//"+token[1].split("/")[0];
			}
			else{
				sourceLink="";
			}
		}
		 
		return sourceLink;
	}

	
	 

	
}
